package windows;

import windows.Clock;
import windows.ManageClient;
import windows.ManageInsumos;
import windows.ManageOrder;
import windows.ManageRecipe;
import windows.WindowAdministrator;
import windows.WindowCreators;
import windows.WindowPastry;
import windows.WindowPrincipal;
import windows.WindowDistribute;
import coordinators.Cordinator;

public class Aplication
{
	public static void main(String[] args)
	{

		WindowPrincipal 	windowPrincipal;
		WindowAdministrator windowAdministrator;
		WindowPastry 		windowPastry;
		WindowDistribute	windowDistribute;
		WindowCreators 		windowCreators;
		WindowReport		createReport;
		ManageClient 		manageClient;
		ElaboratePie 		elaboratePie;
		ManageRecipe 		manageRecipe;
		ManageOrder 		manageOrder;
		ManageInsumos 		manageInsumos;
		Cordinator 			coordinator;
		Clock clock;

		windowPrincipal 	= new WindowPrincipal();
		windowAdministrator	= new WindowAdministrator(windowPrincipal);
		windowPastry		= new WindowPastry(windowPrincipal);
		manageClient		= new ManageClient(windowPrincipal);
		manageRecipe		= new ManageRecipe(windowPrincipal);
		manageOrder			= new ManageOrder(windowPrincipal);
		manageInsumos		= new ManageInsumos(windowPrincipal);
		windowDistribute	= new WindowDistribute(windowPrincipal);
		clock 				= new Clock();
		windowCreators		= new WindowCreators(windowPrincipal);
		coordinator 		= new Cordinator();
		elaboratePie		= new ElaboratePie(windowPrincipal);
		createReport		= new WindowReport(windowPrincipal);

		windowPrincipal.setCoordinador(coordinator);
		windowAdministrator.setCoordinador(coordinator);
		windowPastry.setCoordinador(coordinator);
		manageClient.setCoordinador(coordinator);
		manageRecipe.setCoordinador(coordinator);
		manageOrder.setCoordinador(coordinator);
		manageInsumos.setCoordinador(coordinator);
		windowDistribute.setCoordinador(coordinator);
		windowCreators.setCoordinador(coordinator);
		elaboratePie.setCoordinador(coordinator);
		createReport.setCoordinador(coordinator);
		
		coordinator.setWindowPrincipal(windowPrincipal);
		coordinator.setWindowAdministrator(windowAdministrator);
		coordinator.setWindowPastry(windowPastry);
		coordinator.setManageClient(manageClient);
		coordinator.setManageInsumos(manageInsumos);
		coordinator.setManageOrder(manageOrder);
		coordinator.setManageRecipe(manageRecipe);
		coordinator.setCreateReport(createReport);
		coordinator.setDistribute(windowDistribute);
				
		clock.setVentana(windowPrincipal);
		clock.iniciarreloj();
		
		windowPrincipal.setVisible(true);

	}

}
